//
//  NewLoveMarketingMarkCell.m
//  HCNewGoldFinger
//
//  Created by 刘琛 on 2018/4/11.
//  Copyright © 2018年 zjhcsoftios. All rights reserved.
//

#import "NewLoveMarketingMarkCell.h"
#import <SDWebImage/UIImageView+WebCache.h>
#import "UIColor+EX.h"
#import "NetworkAddress.h"

@interface NewLoveMarketingMarkCell()
@property (weak, nonatomic) IBOutlet UILabel *title;
@property (weak, nonatomic) IBOutlet UILabel *total;
@property (weak, nonatomic) IBOutlet UIImageView *markImage;
@property (weak, nonatomic) IBOutlet UIView *backView;


@end

@implementation NewLoveMarketingMarkCell

- (void)awakeFromNib {
    [super awakeFromNib];
    CAGradientLayer *gradientLayer = [CAGradientLayer layer];
    gradientLayer.colors = @[(__bridge id)[UIColor colorWithHexString:@"63C4FF"].CGColor, (__bridge id)[UIColor colorWithHexString:@"128CC1"].CGColor];
    gradientLayer.locations = @[@0, @1.0];
    gradientLayer.startPoint = CGPointMake(0, 0);
    gradientLayer.endPoint = CGPointMake(0, 1.0);
    gradientLayer.frame = CGRectMake(0, 0, 133, 75);
    [self.backView.layer addSublayer:gradientLayer];
    
}

- (void)setModel:(NewHomeMarkModel *)model {
    _model = model;
    self.title.text = _model.labelName;
    self.total.text = _model.orderCount;
    [self.markImage sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@%@", NMarketMainUrl,model.icon]] completed:nil];
}



@end
